<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <meta http-equiv="expires" content="0">

    <title>子系统切换中...</title>
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="/assets/css/admin.css"/>
    <link id="theme-style" rel="stylesheet" href="/assets/css/theme/theme-blue.css"/>
    <link rel="stylesheet" href="/assets/css/color.css" />
</head>
<body class="layui-layout-body">
    <div id="val"></div>
    <script src="/assets/libs/loading.js"></script>
    
    <!-- js部分 -->
    <script type="text/javascript" src="/assets/libs/layui/layui.js"></script>
    <script type="text/javascript" src="/assets/libs/jquery.min.js"></script>
    <script type="text/javascript" src="/assets/libs/layx/layx.min.js"></script>
    <script type="text/javascript">
        layui.config({
            base: 'module/'
        }).use(["sdLocal", "sdHttp"], function () {
            let sdHttp = layui.sdHttp; 
		    let sdLocal = layui.sdLocal;
			
            let app = sdLocal.app.get();
            let param = {
                url: "/v1/platform/iam/application" ,
                callback: function (d) {
                    sdLocal.token.put(d.token);
                    sdLocal.user.put(d.user);
                    location.replace('./');
                },
                error: function (d) {
                    alert("服务器异常请稍后再试")
                    location.replace('./login.html');
                }
            }
            sdHttp.get(param, app.id);
        })
    </script>
</body>
</html>